<%@ page language="java" contentType="text/html; charset=UTF-8"
		 isELIgnored="false" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<%@ taglib uri="/mytag" prefix="yjd"%>
<script
		src="${requestScope.FPWEB.staticRootPath }/Js/Plugins/Echarts/echarts.min.js"></script>

<div class="wrap">
	<div class="J_Chart_Panel">
		<div class="h_a1" style="clear: both;">
			<span class="title">基础数据-用户数</span>
			<div class="yjd-tip">
				<div style="width:500px;">
					1、注册用户数：在指定的时间段内，在医界贷平台有过注册行为的用户<br/>
					2、充值用户数：在指定的时间段内，在医界贷有过充值行为的用户数(只包含网银充值，快捷充值，借款人的充值不计算在内)<br/>
					3、首次充值用户数：在指定的时间段内，在医界贷进行首次充值行为的用户数 (只包含网银充值，快捷充值，借款人的充值不计算在内)<br/>
					4、投资用户数：在指定的时间段内，有过投资医界贷行为的用户数(含投资“投资项目”、债权转让、小钱包;不包含医信宝)<br/>
					5、首次投资用户数：在医界贷平台的首次投资发生在指定的时间段内的用户数（含投资“投资项目”、债权转让、小钱包；不含医信宝）<br/>
					6、提现用户数：在指定的时间段内，在医界贷平台有过提现行为的用户（不含灵通卡（理财卡）、医信宝提现、借款用户提现不包含在内）<br/>
					7、灵通卡激活用户数：在指定的时间段，已办理灵通卡（理财卡）的用户中已成功激活灵通卡（理财卡）的用户（按照人数统计；办理多张灵通卡、理财卡的用户计为1人）<br/>
					8、绑定服务号的用户数（已关注公众号）:指在指定时间段内，已关注服务号的用户中，已绑定医界贷账号的用户数量（不含取消关注服务号和取消绑定医界贷账号的用户数量）
				</div>
			</div>
		</div>
		<form method="post" id="sumary" autocomplete="off"
			  action="${requestScope.FPWEB.rootPath }/user/summary${requestScope.FPWEB.urlStuff}">
			<div class="search_type cc">
				<label>起始时间：</label> <input type="input" max="${end }"
											min="${start }" name="start" class="input length_1 mr10 J_date"
											value="${start }"> <label>结束时间：</label> <input type="input"
																						   max="${end }" min="${start }" name="end"
																						   class="input length_1 mr10 J_date" value="${end }">
				<button id="search" type="button" class="btn length_1">搜索</button>
			</div>
		</form>
		<div class="count cc" id="cbox">
			<div class="c-box">
				<div class="c-box-head">注册用户数</div>
				<div class="c-box-con">
					<span name="register_account" class="number">Loading</span> <span>人</span>
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">充值用户数</div>
				<div class="c-box-con">
					<span name="recharge_account" class="number">Loading</span> <span>人</span>
				</div>
			</div>

			<div class="c-box">
				<div class="c-box-head">首次充值用户数</div>
				<div class="c-box-con">
					<span name="first_recharge" class="number">Loading</span> <span>人</span>
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">投资用户数</div>
				<div class="c-box-con">
					<span name="invest_account" class="number">Loading</span> <span>人</span>
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">首次投资用户数</div>
				<div class="c-box-con">
					<span name="first_invest" class="number">Loading</span> <span>人</span>
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">提现用户数</div>
				<div class="c-box-con">
					<span name="first_cash" class="number">Loading</span> <span>人</span>
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">灵通卡激活用户数（人）</div>
				<div class="c-box-con">
					<span name="lck_activate" class="number">Loading</span> <span>人</span>
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">绑定服务号的用户数（已关注公众号）</div>
				<div class="c-box-con">
					<span name="wx_bind_count" class="number">Loading</span> <span>人</span>
				</div>
			</div>

		</div>
	</div>
	<%@include file="/WEB-INF/jsp/userStatistic/signUp.jsp"%>
	<%-- <%@include file="/WEB-INF/jsp/userStatistic/signIn.jsp"%> --%>
	<%@include file="/WEB-INF/jsp/userStatistic/rech.jsp"%>
	<%@include file="/WEB-INF/jsp/userStatistic/firstRech.jsp"%>

	<%-- <%@include file="/WEB-INF/jsp/userStatistic/rech_real_time.jsp"%> --%>
	<%@include file="/WEB-INF/jsp/userStatistic/invest.jsp"%>
	<%@include file="/WEB-INF/jsp/userStatistic/firstinvest.jsp"%>
	<%-- <%@include file="/WEB-INF/jsp/userStatistic/invest_real_time.jsp"%> --%>
	<%@include file="/WEB-INF/jsp/userStatistic/cash.jsp"%>
	<%@include file="/WEB-INF/jsp/userStatistic/lck_active.jsp"%>
	<%@include file="/WEB-INF/jsp/userStatistic/lck_un_active.jsp"%>



	<%-- <div class="count cc" style="padding: 0;">
		<form
			action="${requestScope.FPWEB.rootPath }/user/loginRate${requestScope.FPWEB.urlStuff}"
			id="loginRateForm">
			<div class="c-box-head" style="text-align: right;">
				<span class="user-current-left fn-left" style="position: relative; float: left; text-align: left;">
					登录留存率：某段时间内的新增用户，经过一段时间后仍然继续登录的被认作是留存用户；该部分用户占当时新增用户的比例即是登录留存率
				</span>
				<select name="skip" id="loginSkip">
					<option value="7" selected="selected">过去7天</option>
					<option value="30">过去30天</option>
					<option value="13">过去13周</option>
					<option value="12">过去12个月</option>
				</select>
			</div>
		</form>
		<div class="c-box-con" id="loginRateContiner" style="padding: 0;"></div>
	</div>
	<div class="count cc" style="padding: 0;">
		<form
			action="${requestScope.FPWEB.rootPath }/user/investRate${requestScope.FPWEB.urlStuff}"
			id="investRateForm">
			<div class="c-box-head" style="text-align: right;">
				<span class="user-current-left fn-left" style="position: relative; float: left; text-align: left;">
					投资留存率：某段时间内的新增投资用户，经过一段时间后仍然继续投资的被认作是留存用户；该部分用户占当时新增投资用户的比例即是投资留存率
				</span>
				 <select name="skip" id="investSkip">
					<option value="7" selected="selected">过去7天</option>
					<option value="30">过去30天</option>
					<option value="13">过去13周</option>
					<option value="12">过去12个月</option>
				</select>
			</div>
		</form>
		<div class="c-box-con" id="investRateContiner" style="padding: 0;"></div>
	</div> --%>
	<script>
		YJD.use('AppAdminCommon');
		YJD.use('AppBICommon');
		var form = $("#sumary");
		$("#search").click(function() {
			addCompareData();
		});
		function addCompareData() {
			$.ajax({
				type : "post",
				url : form.attr("action"),
				data : form.serializeArray(), // 你的formid
				error : function(request) {
					alert("连接失败！");
				},
				success : function(result) {
					if (result.state == 1) {
						console.log(result);
						$("span[name='register_account']").text(
								result.data.register_account);
						$("span[name='first_cash']").text(
								result.data.first_cash);
						$("span[name='recharge_account']").text(
								result.data.recharge_account);
						$("span[name='invest_account']").text(
								result.data.invest_account);
						$("span[name='first_invest']").text(
								result.data.first_invest);
						$("span[name='first_recharge']").text(
								result.data.first_recharge);
						$("span[name='lck_activate']").text(
								result.data.lck_activate);
						$("span[name='wx_bind_count']").text(
								result.data.wx_bind_count);

					}
				}
			});
		}
		addCompareData();

		function loginRateLoad() {
			var loginRateForm = $("#loginRateForm");
			$.ajax({
				type : "post",
				url : loginRateForm.attr("action"),
				dataType : "html",
				data : loginRateForm.serializeArray(),
				error : function(request) {
					alert("连接失败！");
				},
				success : function(result) {
					$("#loginRateContiner").html(result);
				}
			});
		}

		function investRateLoad() {
			var loginRateForm = $("#investRateForm");
			$.ajax({
				type : "post",
				url : loginRateForm.attr("action"),
				dataType : "html",
				data : loginRateForm.serializeArray(),
				error : function(request) {
					alert("连接失败！");
				},
				success : function(result) {
					$("#investRateContiner").html(result);
				}
			});
		}

		$(function() {
			//loginRateLoad();
			//investRateLoad();
			$("#loginSkip").change(function() {
				loginRateLoad();
			});
			$("#investSkip").change(function() {
				investRateLoad();
			});
		});

	</script>
</div>